﻿using K9Nano.Share.Exceptions;
using Microsoft.AspNetCore.Identity;

namespace K9Nano.IdentityServerCore.Extensions
{
    public static class IdentityResultExtensions
    {
        public static K9UserFriendlyException ToException(this IdentityResult result)
        {
            var error = result.ToString();
            return new K9UserFriendlyException(error);
        }
    }
}